package com.xxx.td;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.FutureTask;

/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/30  16:15
 * @Copyright
 */
public class test01 {
    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask<String> task = new FutureTask<>(new CallableDome());
        new Thread(task).start();
        String s = task.get();
        System.out.println("s = " + s);
        System.out.println(Thread.currentThread().getName() + "-ccc");
    }
}
